#include <stdio.h>
int main(void){
	int i,count=0,sum=0;
	i=3000;
	while(i>=100 && count<10){
		i--;
		if(i%13==0 || i%17==0){
			sum = sum+i;
			count++;
			//printf("%d\n",i);
		}
	}
	printf("SUM=%d\n",sum);
	return 0;
}
